/**
 *
 */
package com.longrise.android.byjk.common;

import android.content.Context;

import com.longrise.android.byjk.R;
import com.longrise.android.byjk.app.BYJKAppLike;

/**
 * simple introduction
 * <p/>
 * detailed comment
 *
 * @author Administrator 2016-1-13
 * @see
 * @since 1.0
 */
public class UrlConstants {

    private static UrlConstants urlConstants;

    private static Context mContext = BYJKAppLike.getAPP();

    private UrlConstants() {
    }

    public static UrlConstants getInstance() {
        if (urlConstants == null) {
            synchronized (UrlConstants.class) {
                if (urlConstants == null) {
                    urlConstants = new UrlConstants();
                }
            }
        }
        return urlConstants;
    }

    //打包测试服务器用assembleDebug,正式用assembleRelease   http://app.yxybb.com   mContext.getString(R.string.baseUrl)
    //安装测试服务器用installDebug,正式用installRelease     http://59.173.241.186:8042
    public static final String BB_BASE = mContext.getString(R.string.baseUrl);

    /**
     * 保易入口
     */
    public static final String BY_URL = mContext.getString(R.string.baseByUrl) + "/restservices/web";

    //培训证书
    public static final String CURR_ZHSURL = BB_BASE + "/BBT/LEAP/html/personelct_certtificate.html?planid=";

    //培训记录
    public static final String CURR_JLURL = BB_BASE + "/BBT/LEAP/html/personelct_trainrecord.html?planid=";

    //地址
    public static final String BaseUrl = BB_BASE + "/restservices/inshapp/";

    //验证码的地址 BBT替换成INSHAPPTEST
    public static final String VFCODE_URL = BB_BASE + "/logic/va/05fe65fa035e4b3c88d1d696f5e5999e.jpg";

    // 升级地址
    private String updateUrl;

    /**
     * @return the updateUrl
     */
    public String getUpdateUrl(Context context) {
        // 升级地址
        updateUrl = context.getResources().getString(R.string.updateUrl);
        return updateUrl;
    }

    /**
     * @param updateUrl the updateUrl to set
     */
    public void setUpdateUrl(String updateUrl) {
        this.updateUrl = updateUrl;
    }
}
